#define _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
#include<stdbool.h>
#include<ctype.h>
#include<math.h>
#include<stdlib.h>
int fib(int n) {
    int a = 1, b = 1;
    int c = 0;
    for (int i = 0; i < n; i++)
    {
        a = b;
        b = c;
        c = a + b;
    }
    return c;
}
int cmp_int(const void* p1, const void* p2)
{
    return (*(int*)p1 - *(int*)p2);
}

bool containsDuplicate(int* nums, int numsSize) {
    qsort(nums, numsSize, sizeof(int), cmp_int);
    for (int i = 0; i < numsSize - 1; i++)
    {
        if (nums[i] == nums[i + 1])
            return true;
    }
    return false;
}
bool isUgly(int n) {
    if (n <= 0)
        return false;
    while (n > 1)
    {
        if (n % 2 == 0)
            n /= 2;
        else if (n % 3 == 0)
            n /= 3;
        else if (n % 5 == 0)
            n /= 5;
        else
            return false;
    }
    return true;
}